

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;public class Calculator {

    
    public static void main(String[] args) 
    {
        try 
        {
             Scanner sc=new Scanner(System.in);
            int a=sc.nextInt();
            char c;
            c = sc.next ().charAt(0);
            int b=sc.nextInt();
           
            System.out.println(Calc.count(a,b,c));
        }
        catch(ArithmeticException e)
        {
            System.out.println(e.getMessage());
        }
        catch(IllegalArgumentException e)
        {
            System.out.println(e.getMessage());
        }
               
        

        
    }
}
